<tagLib name="strends" />
<php>
	function getTypeName($type)
	{
		return l("SHARE_".strtoupper($type));
	}
	function getShareData($data)
	{
		return l("SHARE_DATA_".strtoupper($data));
	}
</php>
<include file="Public:header" />
<load href="__TMPL__Static/Js/share.js" />
<script type="text/javascript">
var CONFIRM_ERROR = "{%CONFIRM_ERROR}";
var CONFIRM_DELETE = "{%CONFIRM_DELETE}";
</script>
<div class="handle-btns">
	<strends:linkBtn text="{%RETURN_LIST}" href="{:Cookie::get('returnUrl')}" />
</div>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/update')}" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="0" border="0" class="table-form">
	<tr>
		<th width="150">{%SHARE_TITLE}</th>
		<td><input type="text" class="textinput" name="title" id="title" value="{$share.title}" style="width:90%"/></td>
	</tr>
	<tr>
		<th>{%SHARE_CONTENT}</th>
		<td>
			<textarea class="areainput" name="content" rows="8">{$share.content}</textarea>
		</td>
	</tr>
	
	<tr>
		<th>{%SHARE_PHOTO}</th>
		<td>
			
				<div class="img_list">		
				<img width="100" height="100" src="/res/{$share.index_img}" />
				<div class="blank9"></div>
				
				</div>
			
		</td>
	</tr>	
	
	<tr class="act">
		<th>&nbsp;</th>
		<td>
			<input type="hidden" name="share_cates" value="<foreach name="share_category" item="cate" key="key"><if condition="$key gt 0">,</if>{$cate.cate_id}</foreach>" />
			<input type="hidden" name="share_id" value="{$share.share_id}" />
			<input type="submit" class="submit_btn" value="{%SUBMIT}" />
			<input type="reset" class="reset_btn" value="{%RESET}" />
		</td>
	</tr>
</table>
</form>
<script type="text/javascript">
jQuery(function($){
	var num = $("input[name=is_knack]:checked").val();
	show_knack(num);
});
function show_knack(num){
	if(num==1){
		$('#show_knack').show();
	}else{
		$('#show_knack').hide();
	}
}
</script>
<include file="Public:footer" />